package jtk.project4.fleet.field;

import java.awt.FlowLayout;

import nl.coderight.jazz.form.FormField;
import nl.coderight.jazz.form.FormLayout;
//import nl.coderight.jazz.form.FormLayout.Align;
//import nl.coderight.jazz.form.FormLayout.Resize;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ImageField;
import nl.coderight.jazz.form.control.TabControl;
import nl.coderight.jazz.form.control.TabItem;
import nl.coderight.jazz.form.FormView;

public class TireInfoField extends GroupControl{
	private TabControl TireInfoTab;
	private TabItem SelectedTireTab;
	private TabItem TireInventoryTab;
	private ImageField PurchaseDateField;
	
	private FormField createTabFields()
	{
		TireInfoTab = new TabControl();
		SelectedTireTab = new TabItem ("Selected Tire");
		TireInventoryTab = new TabItem ("Tire Inventory");
		TireInfoTab.addTab(SelectedTireTab, createSelectedTireTab());
		TireInfoTab.addTab(TireInventoryTab, createTireInventoryTab());
		return TireInfoTab;
	}
	
	private void createFields(){
		PurchaseDateField = new ImageField();
	}
	
	private GroupControl createSelectedTireTab() {
		GroupControl form = new GroupControl();
		form.setLayout(new FormLayout())
		.addField(PurchaseDateField)
		;
		return form;
	}
	
	private GroupControl createTireInventoryTab() {
		GroupControl form = new GroupControl();
		form.setLayout(new FormLayout())
		.addField(PurchaseDateField)
		;
		return form;
	}
	
	public TireInfoField(String bindID){
		setBindID(bindID);
		//createTabFields();
		createFields();
		createLayout();
	}
	
	private void createLayout() {
		// TODO Auto-generated method stub
		setLayout(new FormLayout())
		.addField(createTabFields())
		;
	
	}
}